package com.itheima.day10;

public class JieCheng {
    public static int jiecheng(int n) {
    if(n == 1){
        return 1;
    }
        return jiecheng(n-1)*n;
    }
    public static int sum(int n) {
        if(n == 1){
            return 1;
        }
        return sum(n-1)+n;
    }

    public static void main(String[] args) {
        System.out.println(sum(1000));
    }
}
